package cn.tedu.administration.service.impl;

import cn.tedu.administration.mapper.MeetingMapper;
import cn.tedu.administration.pojo.dto.MeetingQuery;
import cn.tedu.administration.pojo.dto.MeetingSaveParam;
import cn.tedu.administration.pojo.vo.MeetingVO;
import cn.tedu.administration.service.MeetingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class MeetingServiceImpl implements MeetingService {

    @Autowired
    private MeetingMapper meetingMapper;


    @Override
    public void save(MeetingSaveParam meetingSaveParam) {
        log.debug("这是会议室保存数据的第二次出现：{}", meetingSaveParam);
        meetingMapper.save(meetingSaveParam);
    }


    @Override
    public void delete(Long id) {
        log.debug("这是删除房间号的第2次出现：{}", id);
        meetingMapper.delete(id);
    }


    @Override
    public List<MeetingVO> load(MeetingQuery meetingQuery) {
        log.debug("这是查询的第2次出现{}", meetingQuery);
        List<MeetingVO> list = meetingMapper.load(meetingQuery);
        return  list;
    }
}
